<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<portlet:defineObjects />

<h1>Quản Lí Khoa</h1>
<portlet:renderURL var="addURL">
	<portlet:param name="action" value="addFacluty"/>
</portlet:renderURL>

<portlet:actionURL var="editFacultyURL">
	<portlet:param name="action" value="editFaculty"/>
</portlet:actionURL>

<portlet:renderURL var="listURL">
	<portlet:param name="action" value="list"/>
</portlet:renderURL>


<portlet:actionURL var="deleteFacultyURL">
	<portlet:param name="action" value="deleteFaculty"/>
</portlet:actionURL>


<span><a href="${addURL}">Thêm Khoa</a></span>
<table border="1">
	
	<thead>
		<td>Tên Khoa</td>
		<td>Edit</td>
		<td>Delete</td>
	</thead>
	<c:forEach items="${listFaculty}" var="e">
		<tr>
			<td>${e.nameFaculty}</td>
			<td><form action="${editFacultyURL}" method="post">
				<input type="hidden" name='<portlet:namespace/>idFaculty' value="${e.idFaculty}"/>
				<input type="submit" value="Edit"/>
			</form></td>
			<td><form action="${deleteFacultyURL}" method="post">
				<input type="hidden" name='<portlet:namespace/>idFaculty' value="${e.idFaculty}"/>
				<input type="submit" value="Delete"/>
			</form></td>
		</tr>
	</c:forEach>
	
</table>
<a href="${listURL}">Back</a>
